#include "sdmp_cmd_lookup.h"
#include <stdio.h>

int main(void) {
    /* 初始化 */
    if (sdmp_cmd_lookup_init() != 0) {
        printf("Failed to initialize cmd lookup\n");
        return -1;
    }

    /* 查找测试 */
    printf("register: %d\n", sdmp_cmd_code_lookup("register"));     // 输出 1001
    printf("keepAlive: %d\n", sdmp_cmd_code_lookup("keepAlive"));   // 输出 1002
    printf("transDown: %d\n", sdmp_cmd_code_lookup("transDown"));   // 输出 2011
    printf("transUp: %d\n", sdmp_cmd_code_lookup("transUp"));       // 输出 2012
    printf("invalid: %d\n", sdmp_cmd_code_lookup("invalid"));       // 输出 0

    /* 清理 */
    sdmp_cmd_lookup_destroy();

    return 0;
}